import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
// import Layout from '../components/HelloWorld.vue'

const routes: Array<RouteRecordRaw> = [
  {
  //路由初始指向
    path: '/',
    name: 'HelloWorld',
    component:()=>import('../view/home.vue'),
  },
  {
  //路由初始指向
    path: '/about',
    name: 'about',
    component:()=>import('../components/about.vue'),
  },
  {
  //路由初始指向
    path: '/slot',
    name: 'slot',
    component:()=>import('../view/slot.vue'),
  },
  {
  //路由初始指向
    path: '/indexDB',
    name: 'indexDB',
    component:()=>import('../components/CustomComponent.vue'),
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
